package quickup;

import java.awt.Component;

import javax.swing.JProgressBar;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellRenderer;

public class AdvancedCellRenderer implements TableCellRenderer {

	private DefaultTableCellRenderer dtcr = new DefaultTableCellRenderer();
	
	public Component getTableCellRendererComponent(JTable table,
            Object value,
            boolean isSelected,
            boolean hasFocus,
            int row,
            int column) {
		if(table.getColumnClass(column) == JProgressBar.class) {
			return (JProgressBar)value;
		} else {
			return dtcr.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
		}
	}

}
